import request from "@/api";
import {reportTag, stsReportListReqType, stsReportListResType,} from "@/api/management/type";
import {resData} from "@/api/goloalType";


//文件菜单

export const stsReportList = (params: stsReportListReqType) => request.get<any, resData<{list:stsReportListResType[],total:number}>>('/reportApi/report/report/list_sts_report', {params: params})

//获取报告数据标识
export const getReportTag = (params: {id:string}) => request.get<any, resData<reportTag>>(`/reportApi/report/genfile/get_report_tag/${params.id}`, {params: params})

//获取报告关联视图列表
export const getTemplateFileConfig = (params: {id:string}) => request.get<any, resData<any>>(
    `/reportApi//report/report/get_template_file_config/${params.id}`, {params: params})

// 生成/重新生成报告，返回文件打开配置
export const getGenReportfile = (params: {instanceId:string|number}) => request.get<any, resData<any>>(`/reportApi/report/report_instance/gen/reportfile`, {
    params: params
})

// 获取报告文件打开配置
export const getReportfile = (params: {instanceId:string|number}) => request.get<any, resData<any>>(`/reportApi/report/report_instance/get/reportfile`, {
    params: params
})
